<?php				
	/*
	*  view  *
	*/
	echo "view.thtml\n";
	$vgen = "";
	$vgen .= pr("<?php");
	$vgen .= pr("\techo \$accessibility->whereIAm(\$pageTitle);");
	$vgen .= pr("\techo \"<h2 id='contentTitle'>\".\$pageTitle.\"</h2>\";");
	$vgen .= pr("\techo \"<div id='view'>\";");
	foreach ($viewc as $c) {
		if (substr($c,-3,3) == "_id") {
			$col_name = substr($c,0,strlen($c)-3);
			$col_name = ucfirst($col_name);
		} else {
			$col_name = ucfirst($c);
		}
		if (substr($c,-3,3) == "_id") {
			$vgen .= pr ("\techo \"<p><label>".$col_name.":</label><span>\".\$".$strDS."['".$col_name."']['nome'].\"</span></p>\";");
		} else {
			$vgen .= pr ("\techo \"<p><label>".$col_name.":</label><span>\".\$".$strDS."['".$strUS."']['".$c."'].\"</span></p>\";");
		}
	}
	
	$vgen .= pr("\techo \"<br />\";");
	$vgen .= pr("\techo \$html->link(\"Listar ".$strDP."\",\"/".$strDP."/\");");
	$vgen .= pr("\techo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp\";");
	$vgen .= pr("\techo \$html->link(\"Editar ".$strDS."\",\"/".$strDP."/edit/\".\$".$strDS."['".$strUS."']['id']);");
	$vgen .= pr("\techo \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp\";");
	$vgen .= pr("\techo \$html->link(\"Apagar ".$strDS."\", '/".$strDP."/delete/'.\$".$strDS."['".$strUS."']['id'], array(), 'Confirma a exclusão deste item?');");
	$vgen .= pr("\techo \"</div>\";");
	$vgen .= pr("?>");
	echo $vgen;
?>